﻿/*---------------------------------------------------------------------*/
// fileName="IDirectoryService.cs" CompanyName="SureKAM"
// Copyright SureKAM (c). All right reserved.
/*---------------------------------------------------------------------*/

namespace SureKAM.BackUp.Notify.Service.Interfaces
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public interface IDirectoryService
    {
        /// <summary>
        /// 添加Directory对象
        /// </summary>
        /// <param name="directory">Directory对象</param>
        /// <returns>返回Directory对象ID</returns>
        string Add(Domain.Directory directory);

        /// <summary>
        /// 更新Directory对象
        /// </summary>
        /// <param name="directory">directory对象</param>
        /// <returns>返回更新后的directory</returns>
        Domain.Directory Update(Domain.Directory directory);

        /// <summary>
        /// 删除Directory对象
        /// </summary>
        /// <param name="directory">directory对象</param>
        /// <returns>返回删除的directory对象Id</returns>
        string Delete(Domain.Directory directory);

        /// <summary>
        /// 根据Directory Id 获取directory对象
        /// </summary>
        /// <param name="id">direcory id</param>
        /// <returns>返回相应的directory对象</returns>
        Domain.Directory GetDirectoryById(string id);

        /// <summary>
        /// 获取所有Directory对象
        /// </summary>
        /// <returns></returns>
        List<Domain.Directory> GetDirectories();

        /// <summary>
        /// 添加DNMapping
        /// </summary>
        /// <param name="directoryId">directory 对象Id</param>
        /// <param name="notifyId">notify 对象Id</param>
        /// <returns></returns>
        bool AddDNMapping(string directoryId,string notifyId);

        /// <summary>
        /// 删除DNMapping
        /// </summary>
        /// <param name="driectoryId">directory 对象Id</param>
        /// <param name="notifyId">notify 对象Id</param>
        /// <returns></returns>
        bool DeleteDNMapping(string driectoryId, string notifyId);
    }
}
